using System;
using System.Text;

namespace iBeauty.BusinessObjects
{
	[Serializable()]
	public class Supplier
	{
		private string _ID;

		public string ID
		{
			get { return _ID; }
			set { _ID = value; }
		}

		private DateTime? _CreateDate;

		public DateTime? CreateDate
		{
			get { return _CreateDate; }
			set { _CreateDate = value; }
		}

		private DateTime? _ModifiedDate;

		public DateTime? ModifiedDate
		{
			get { return _ModifiedDate; }
			set { _ModifiedDate = value; }
		}

		private DateTime? _TimeStamp;

		public DateTime? TimeStamp
		{
			get { return _TimeStamp; }
			set { _TimeStamp = value; }
		}

		private string _SupplierCode;

		public string SupplierCode
		{
			get { return _SupplierCode; }
			set { _SupplierCode = value; }
		}

		private string _SupplierName;

		public string SupplierName
		{
			get { return _SupplierName; }
			set { _SupplierName = value; }
		}

		private string _Address;

		public string Address
		{
			get { return _Address; }
			set { _Address = value; }
		}

		private string _Email;

		public string Email
		{
			get { return _Email; }
			set { _Email = value; }
		}

		private string _Phone;

		public string Phone
		{
			get { return _Phone; }
			set { _Phone = value; }
		}

		private string _Fax;

		public string Fax
		{
			get { return _Fax; }
			set { _Fax = value; }
		}

		private int? _PaymentType;

		public int? PaymentType
		{
			get { return _PaymentType; }
			set { _PaymentType = value; }
		}

		private DateTime? _PaymentDate;

		public DateTime? PaymentDate
		{
			get { return _PaymentDate; }
			set { _PaymentDate = value; }
		}

		private string _ATM;

		public string ATM
		{
			get { return _ATM; }
			set { _ATM = value; }
		}

		private int? _AccountId;

		public int? AccountId
		{
			get { return _AccountId; }
			set { _AccountId = value; }
		}

		private string _Note;

		public string Note
		{
			get { return _Note; }
			set { _Note = value; }
		}

		public Supplier()
		{ }

		public Supplier(string ID,DateTime? CreateDate,DateTime? ModifiedDate,DateTime? TimeStamp,string SupplierCode,string SupplierName,string Address,string Email,string Phone,string Fax,int? PaymentType,DateTime? PaymentDate,string ATM,int? AccountId,string Note)
		{
			this.ID = ID;
			this.CreateDate = CreateDate;
			this.ModifiedDate = ModifiedDate;
			this.TimeStamp = TimeStamp;
			this.SupplierCode = SupplierCode;
			this.SupplierName = SupplierName;
			this.Address = Address;
			this.Email = Email;
			this.Phone = Phone;
			this.Fax = Fax;
			this.PaymentType = PaymentType;
			this.PaymentDate = PaymentDate;
			this.ATM = ATM;
			this.AccountId = AccountId;
			this.Note = Note;
		}

		public override string ToString()
		{
			return "ID = " + ID + ",CreateDate = " + CreateDate.ToString() + ",ModifiedDate = " + ModifiedDate.ToString() + ",TimeStamp = " + TimeStamp.ToString() + ",SupplierCode = " + SupplierCode + ",SupplierName = " + SupplierName + ",Address = " + Address + ",Email = " + Email + ",Phone = " + Phone + ",Fax = " + Fax + ",PaymentType = " + PaymentType.ToString() + ",PaymentDate = " + PaymentDate.ToString() + ",ATM = " + ATM + ",AccountId = " + AccountId.ToString() + ",Note = " + Note;
		}

		public class IDComparer : System.Collections.Generic.IComparer<Supplier>
		{
			public SorterMode SorterMode;
			public IDComparer()
			{ }
			public IDComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Supplier> Membres
			int System.Collections.Generic.IComparer<Supplier>.Compare(Supplier x, Supplier y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.ID.CompareTo(x.ID);
				}
				else
				{
					return x.ID.CompareTo(y.ID);
				}
			}
			#endregion
		}
		public class SupplierCodeComparer : System.Collections.Generic.IComparer<Supplier>
		{
			public SorterMode SorterMode;
			public SupplierCodeComparer()
			{ }
			public SupplierCodeComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Supplier> Membres
			int System.Collections.Generic.IComparer<Supplier>.Compare(Supplier x, Supplier y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.SupplierCode.CompareTo(x.SupplierCode);
				}
				else
				{
					return x.SupplierCode.CompareTo(y.SupplierCode);
				}
			}
			#endregion
		}
		public class SupplierNameComparer : System.Collections.Generic.IComparer<Supplier>
		{
			public SorterMode SorterMode;
			public SupplierNameComparer()
			{ }
			public SupplierNameComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Supplier> Membres
			int System.Collections.Generic.IComparer<Supplier>.Compare(Supplier x, Supplier y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.SupplierName.CompareTo(x.SupplierName);
				}
				else
				{
					return x.SupplierName.CompareTo(y.SupplierName);
				}
			}
			#endregion
		}
		public class AddressComparer : System.Collections.Generic.IComparer<Supplier>
		{
			public SorterMode SorterMode;
			public AddressComparer()
			{ }
			public AddressComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Supplier> Membres
			int System.Collections.Generic.IComparer<Supplier>.Compare(Supplier x, Supplier y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Address.CompareTo(x.Address);
				}
				else
				{
					return x.Address.CompareTo(y.Address);
				}
			}
			#endregion
		}
		public class EmailComparer : System.Collections.Generic.IComparer<Supplier>
		{
			public SorterMode SorterMode;
			public EmailComparer()
			{ }
			public EmailComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Supplier> Membres
			int System.Collections.Generic.IComparer<Supplier>.Compare(Supplier x, Supplier y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Email.CompareTo(x.Email);
				}
				else
				{
					return x.Email.CompareTo(y.Email);
				}
			}
			#endregion
		}
		public class PhoneComparer : System.Collections.Generic.IComparer<Supplier>
		{
			public SorterMode SorterMode;
			public PhoneComparer()
			{ }
			public PhoneComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Supplier> Membres
			int System.Collections.Generic.IComparer<Supplier>.Compare(Supplier x, Supplier y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Phone.CompareTo(x.Phone);
				}
				else
				{
					return x.Phone.CompareTo(y.Phone);
				}
			}
			#endregion
		}
		public class FaxComparer : System.Collections.Generic.IComparer<Supplier>
		{
			public SorterMode SorterMode;
			public FaxComparer()
			{ }
			public FaxComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Supplier> Membres
			int System.Collections.Generic.IComparer<Supplier>.Compare(Supplier x, Supplier y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Fax.CompareTo(x.Fax);
				}
				else
				{
					return x.Fax.CompareTo(y.Fax);
				}
			}
			#endregion
		}
		public class ATMComparer : System.Collections.Generic.IComparer<Supplier>
		{
			public SorterMode SorterMode;
			public ATMComparer()
			{ }
			public ATMComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Supplier> Membres
			int System.Collections.Generic.IComparer<Supplier>.Compare(Supplier x, Supplier y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.ATM.CompareTo(x.ATM);
				}
				else
				{
					return x.ATM.CompareTo(y.ATM);
				}
			}
			#endregion
		}
		public class NoteComparer : System.Collections.Generic.IComparer<Supplier>
		{
			public SorterMode SorterMode;
			public NoteComparer()
			{ }
			public NoteComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Supplier> Membres
			int System.Collections.Generic.IComparer<Supplier>.Compare(Supplier x, Supplier y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Note.CompareTo(x.Note);
				}
				else
				{
					return x.Note.CompareTo(y.Note);
				}
			}
			#endregion
		}
	}
}
